<script setup lang="ts">

</script>

<template>
<div class="wrap">
  <header>
    <nav>
      <ul>
        <li>
          <a href="">home</a>
        </li>
        <li>
          <a href="">blog</a>
        </li>
        <li>
          <a href="">about</a>
        </li>
        <li>
          <a href="">contact</a>
        </li>
      </ul>
    </nav>
  </header>
  <main>

    <h2>现代 Web 布局技术</h2>
    <p>使用 CSS Flexbox 技术构建 Sticky Footer 布局</p>

  </main>
  <footer>
    <p>Sticky Footer布局</p>
  </footer>
</div>
</template>

<style scoped lang="scss">
.wrap {
  width: 100vw;
  min-height: 100vh;
  font-family: "Exo", Arial, sans-serif;
  background-color: #f90;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1px;

  & > * {
    background-color: #fff;
    color: #f90;
    padding: 1vw 20px;
    font-size: 0.8rem;
  }

  ul {
    list-style: none outside none;
  }
  h2 + p {
    margin-top: 1rem;
    line-height: 1.65;
    font-size: 0.8em;
  }
  header,
  footer {
    flex-shrink: 0;
  }
  header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    h1 {
      text-transform: uppercase;
      white-space: nowrap;
      margin: 0;
    }
    a {
      color: #f90;
      text-decoration: none;
    }
    ul {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      a {
        display: block;
        padding: 0.35em 0.5em;
        text-transform: uppercase;
        white-space: nowrap;
      }
    }
  }

  main {
    padding: 20px;
    flex: 1 0 auto;
    min-height: 0;
  }

  footer {
    display: flex;
    justify-content: center;
  }

}

</style>
